{% extends "main/index.html" %}

{% block title %}Edit favorites{% endblock %}

{% block content %}

<h1>Edit favorites</h1>

<form action="{% url favoriteEdit %}" method="post">
{% csrf_token %}
  {% for favorite in favorites %}
  <p>
    <label for="favorite{{ forloop.counter}}">Favorite {{ forloop.counter}}: </label>
    <input name="favorite{{ forloop.counter}}" type="text" value="{{ favorite.search }}" />
  </p>
  {% endfor %}

  <p>
    <input type="submit" value="Update" />
  </p>

</form>

{% endblock %}
